package designpatterns.factory.abstact;

/**
 * @program: MyTank
 * @description:
 * @author: 王术平
 * @create: 2021-01-11 22:51
 **/
public class Test {
    public static void main(String[] args) {
        MagicFactory mf = new MagicFactory();
        mf.createFood().printName();
        mf.createVehicle().go();
        mf.createWeapon().attach();


        SwordmanFactory sf=new SwordmanFactory();
        sf.createFood().printName();
        sf.createVehicle().go();
        sf.createWeapon().attach();

    }
}
